import Vue from 'vue'
import VueRouter from 'vue-router'


//登录组件路由
import Login from '../views/Login/index.vue'
// 商品详情
import Detali from '../components/detali.vue'

//Tabbar路由
import Mine from '../views/Mine/index.vue'
import Category from '../views/Category/index.vue'
import Shouye from '../views/Shouye/index.vue'
import Cart from '../views/Cart/index.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
	redirect:'mine'
  },
  {
    path: '/login',
  	name:'login',
    component: Login
  },
  {
	  path: '/mine',
	  name:'mine',
	  component: Mine
  },
  {
	  path: '/category',
	  name:'category',
	  component: Category
  },
  {
	  path: '/cart',
	  name:'cart',
	  component: Cart
  },
  {
	  path: '/shouye',
	  name:'shouye',
	  component: Shouye
  },
  {
	  path: '/detali',
	  name:'detali',
	  component: Detali
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
